home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / BOOPSI / GI1 / Doc / tabs_gc.doc < prev   
Encoding:
Text File  |  1994-03-11  |  7.8 KB  |  230 lines

  1. TABLE OF CONTENTS
  2.  
  3. tabs.gadget/--datasheet--
  4. tabs.gadget/GM_GOACTIVE
  5. tabs.gadget/GM_HITTEST
  6. tabs.gadget/GM_LAYOUT
  7. tabs.gadget/GM_RENDER
  8. tabs.gadget/OM_GET
  9. tabs.gadget/OM_NEW
  10. tabs.gadget/OM_SET
  11. tabs.gadget/--datasheet--                           tabs.gadget/--datasheet--
  12.  
  13.      NAME
  14.         tabs.gadget--File folder tabs gadget.                   (V42)
  15.  
  16.      SUPERCLASS
  17.         gadgetclass
  18.  
  19.      DESCRIPTION
  20.         The tabs gadget class provides a custom control that has imagry
  21.         similar in style to the tabs seen in a drawer full of file folders.
  22.         The action of the gadget is the same as a conventional
  23.         mutual-exclusion control in that only one tab can be active at a time
  24.         and a tab is selected by clicking upon it.
  25.  
  26.         The purpose of the tabs gadget class is to provide functionality like
  27.         the page selection cycle gadget on the top-right side of the AmigaOS
  28.         2.1 PrinterPS preferences editor, but allowing all the choices to be
  29.         visible at the same time.
  30.  
  31.         This gadget class requires 3.0 (V39) or greater.
  32.  
  33.      METHODS
  34.         OM_NEW--Create the button gadget.  Passed to superclass, then OM_SET.
  35.  
  36.         OM_GET--Get an object attribute.  Passed to superclass for unknown
  37.             attributes.
  38.  
  39.         OM_SET--Set object attributes.  Passed to superclass first.
  40.  
  41.         OM_UPDATE--Set object notification attributes.  Passed to superclass
  42.             first.
  43.  
  44.         GM_LAYOUT--Calculate gadget imagry positioning.  Passed to superclass
  45.             first.
  46.  
  47.         GM_RENDER--Renders the gadget imagry.  Overrides the superclass.
  48.  
  49.         GM_HITTEST--Determines if mouse is within the gadget rectangle.  Over-
  50.             rides the superclass.
  51.  
  52.         GM_GOACTIVE--Handles activation, toggle-select and button-select.
  53.             Overrides the superclass.
  54.  
  55.         GM_GOINACTIVE--Deselects the button.  Overrides the superclass.
  56.  
  57.         All other methods are passed to the superclass, including OM_DISPOSE.
  58.  
  59.      ATTRIBUTES
  60.         GA_Disabled (BOOL) -- Determines whether the button is disabled or
  61.             not.  Changing disable state will invoke GM_RENDER.  A disabled
  62.             button's border and label are all rendered in SHADOWPEN and then
  63.             dusted in a ghosting pattern that is rendered in SHADOWPEN.
  64.             Defaults to FALSE.
  65.  
  66.         GA_TextAttr (struct TextAttr *) -- Text attribute for the font to
  67.             use for the labels.
  68.  
  69.         LAYOUTA_ChildMaxWidth (BOOL) -- Indicate whether the tabs should be
  70.             the width of the widest label.  Defaults to TRUE.
  71.  
  72.         TABS_Labels (TabLabelP) -- An array of TabLabel structures used to
  73.             indicate the labels for each of the tabs.
  74.  
  75.         TABS_Current (LONG) -- Currently selected tab.  Defaults to zero.
  76.  
  77.      NOTES
  78.         This gadget class requires 3.0 or beyond to run.
  79.  
  80. tabs.gadget/GM_GOACTIVE                               tabs.gadget/GM_GOACTIVE
  81.  
  82.      NAME
  83.         GM_GOACTIVE--Activate a gadget.                         (V42)
  84.  
  85.      FUNCTION
  86.         The GM_GOACTIVE method is used to indicate to a gadget that it has
  87.         become active.  This method overrides the superclass.
  88.  
  89.         Invokes GM_RENDER with GREDRAW_UPDATE set if the current tab is
  90.         changed.
  91.  
  92.      RESULT
  93.         If a new tab is selected, then returns GMR_VERIFY | GMR_NOREUSE.
  94.  
  95.         All other cases returns GMR_NOREUSE.
  96.  
  97.         Sets the *msg->gpi_Termination field to TABS_Current, which in turn
  98.         fills in the IntuiMessage->Code field.
  99.  
  100. tabs.gadget/GM_HITTEST                                 tabs.gadget/GM_HITTEST
  101.  
  102.      NAME
  103.         GM_HITTEST--Is gadget hit.                              (V42)
  104.  
  105.      FUNCTION
  106.         The GM_HITTEST method is used to determine if the given mouse
  107.         coordinates are within the domain of the gadget.  This method
  108.         overrides the superclass.
  109.  
  110.      RESULT
  111.         This method returns GMR_GADGETHIT if within the domain, otherwise
  112.         zero is returned.
  113.  
  114. tabs.gadget/GM_LAYOUT                                   tabs.gadget/GM_LAYOUT
  115.  
  116.      NAME
  117.         GM_LAYOUT--Calculate the positioning of the imagry.     (V42)
  118.  
  119.      FUNCTION
  120.         The GM_LAYOUT method is used to calculate the domain of the gadget
  121.         and to center the label within the domain.  This method is passed to
  122.         the superclass first.
  123.  
  124.         Gadget relativity is fully supported.
  125.  
  126.      RESULT
  127.         This method returns 0.
  128.  
  129. tabs.gadget/GM_RENDER                                   tabs.gadget/GM_RENDER
  130.  
  131.      NAME
  132.         GM_RENDER--Render the visuals of the gadget.            (V42)
  133.  
  134.      FUNCTION
  135.         The GM_RENDER method is used to render the visuals of the gadget.
  136.         This method overrides the superclass.
  137.  
  138.         If the gadget is disabled, then the ghosting pattern is applied.
  139.  
  140.      RESULT
  141.         This method returns 0.
  142.  
  143. tabs.gadget/OM_GET                                         tabs.gadget/OM_GET
  144.  
  145.      NAME
  146.         OM_GET--Get an attribute of a tabs.gadget object.       (V42)
  147.  
  148.      FUNCTION
  149.         The OM_GET method is used to get an attributes of a tabs.gadget.
  150.         This method is passed to the superclass for any attribute the
  151.         class doesn't understand..
  152.  
  153.      ATTRIBUTES
  154.         The following attributes can be obtained from the tabs.gadget.
  155.  
  156.         TABS_Current (LONG) -- Currently selected tab.
  157.  
  158.      RESULT
  159.         Returns TRUE (1) if the attribute can be obtained, otherwise
  160.         returns FALSE (0).
  161.  
  162. tabs.gadget/OM_NEW                                         tabs.gadget/OM_NEW
  163.  
  164.      NAME
  165.         OM_NEW--Create a tabs.gadget object.                    (V42)
  166.  
  167.      FUNCTION
  168.         The OM_NEW method is used to create an instance of the tabs.gadget
  169.         class.  This method is passed to the superclass first.
  170.  
  171.      ATTRIBUTES
  172.         The following attributes can be specified at creation time.
  173.  
  174.         GA_Top (LONG) -- The top of the gadget.  Should be
  175.             win->BorderTop + 2.
  176.  
  177.         GA_Left (LONG) -- The left edge of the gadget.
  178.  
  179.         GA_Height (LONG) -- Height of the gadget.  Should be the font
  180.             height plus seven.
  181.  
  182.         GA_RelHeight (LONG) -- Although this attribute is supported, it is
  183.             stylistically a bad thing to do.
  184.  
  185.         GA_Disabled (BOOL) -- Determines whether the gadget is disabled or
  186.             not.  Defaults to FALSE.
  187.  
  188.         GA_TextAttr (struct TextAttr *) -- Text attribute for the font to
  189.             use for the labels.
  190.  
  191.      RESULT
  192.         If the object was created then a pointer to the object is returned,
  193.         otherwise NULL is returned.
  194.  
  195. tabs.gadget/OM_SET                                         tabs.gadget/OM_SET
  196.  
  197.      NAME
  198.         OM_SET--Set the attributes of a tabs.gadget object.     (V42)
  199.  
  200.      FUNCTION
  201.         The OM_SET method is used to set the attributes of a tabs.gadget.
  202.         This method is passed to the superclass first.
  203.  
  204.      ATTRIBUTES
  205.         The following attributes can be changed at OM_SET or OM_UPDATE.
  206.  
  207.         GA_Disabled (BOOL) -- Determines whether the gadget is disabled or
  208.             not.  Changing disable state will invoke GM_RENDER.  A disabled
  209.             gadget's border and label are all rendered in SHADOWPEN and then
  210.             dusted in a ghosting pattern that is rendered in SHADOWPEN.
  211.             Defaults to FALSE.
  212.  
  213.         GA_TextAttr (struct TextAttr *) -- Text attribute for the font to
  214.             use for the labels.
  215.  
  216.         LAYOUTA_ChildMaxWidth (BOOL) -- Indicate whether the tabs should be
  217.             the width of the widest label.  Defaults to TRUE.
  218.  
  219.         TABS_Labels (TabLabelP) -- An array of TabLabel structures used to
  220.             indicate the labels for each of the tabs.
  221.  
  222.         TABS_Current (LONG) -- Currently selected tab.  Defaults to zero.
  223.  
  224.      RESULT
  225.         The class will update the attributes of object.  Changing some
  226.         attributes will result in GM_LAYOUT and/or GM_RENDER being called.
  227.  
  228.         The return value will be non-zero if the gadget needs to be refreshed.
  229.  
  230.